
import defaultSettings from '@/settings'
import request from '@/utils/request'

export const apiUrlConfig = {
  queryUrl: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/search`,
  exportUrl: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/search`,
}

export function save(data) {
    return request({
      url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/save`,
      method: "post",
      data
    });
}


export function getByName(name) {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/searchByName`,
    method: "get",
    params: {
      name
    }
  });
}

export function update(data) {
    return request({
      url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/update`,
      method: "post",
      data
    });
}

export function del(name) {
    return request({
      url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/delete?name=${name}`,
      method: "post",
    });
}


export function getAll() {
  return request({
    url: `${defaultSettings.ctx.cnapsApp}/common/toplinkFlow/component/searchAll`,
    method: "get",
    
  });
}

